<?php  
defined('APPLICATION_URL')||define('APPLICATION_URL', '/ITjap(tung)/ITjap_finalversion');
session_start();
$userId=$_SESSION['userId'];
if(!isset($userId)) header('Location:'.APPLICATION_URL.'/index.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>


<!-- head - Finished -->
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<link rel="stylesheet" href="<?php echo APPLICATION_URL;?>/css/layout.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="<?php echo APPLICATION_URL;?>/css/home.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="<?php echo APPLICATION_URL;?>/css/sys.css" type="text/css" media="screen" />	
	<title>会議室予約システム</title>
</head>
<!-- /head - Finished -->

<body>
<!-- header area -->
	<div id="header_area">
	  <div id="header">
	    <div id="header_link_area">
	      <a name="pagetop"></a>
	      <div id="header_appeal">会議室予約システム</div>
	      <div id="header_link">
	        <ul>
	          <li class="header_b_1"><a href="<?php echo APPLICATION_URL;?>/view/manager/admin.php" class="header_b_1"><img src="<?php echo APPLICATION_URL;?>/images/header/header_b_1.gif" alt="ホーム" width="56" height="21" /></a></li>
	          <li class="logout"><a href="<?php echo APPLICATION_URL;?>/controller/logout.php" class="logout"><img src="<?php echo APPLICATION_URL;?>/images/header/header_b_5.gif" alt="ログオウト" width="71" height="21" /></a></li>
	          <li class="header_b_3"><a href="" class="header_b_3"><img src="<?php echo APPLICATION_URL;?>/images/header/header_b_3.gif" alt="特定商取引に基づく表記" width="155" height="21" /></a></li>
	          <li class="header_b_4"><a href="<?php echo APPLICATION_URL;?>/index.php" class="header_b_4"><img src="<?php echo APPLICATION_URL;?>/images/header/header_b_4.gif" alt="お問い合せ" width="82" height="21" /></a></li>
	        </ul>
	      </div>
	    </div>
	    <div id="header_title">
	       <img id="SiteHeader1_imgTitle" src="<?php echo APPLICATION_URL;?>/images/header/header_title_1.gif" alt="貸会議室予約" style="height:90px;width:960px;border-width:0px;" /> 
	    </div>
	  </div>
	</div>
<!-- header area-->
	
<!-- pan_area -->
	      <div id="pan_area">
	        <div id="pan">
	          <ul>
	            <li><a href="<?php echo APPLICATION_URL;?>/view/manager/admin.php">ホーム</a></li>
	          </ul>
	        </div>
	      </div>
<!-- pan_area -->
	  
<!-- main_area -->
	<div id="main_top_area">&nbsp;</div>
	    
	<!-- main_middle_area -->   
	<div id="main_middle_area">
	
	    <!-- main area-->
		<div id="main_area">
		
			<!-- main -->
			<div id="main">
				  <!-- navi -->
				      <div id="navi">
				        <ul>
				          <li class="kanrisha_shitsu"><a href="<?php echo APPLICATION_URL;?>/view/manager/room_manager.php" class="kanrisha_shitsu"><img src="<?php echo APPLICATION_URL;?>/images/navi/kanrisha_shitsu.gif" alt="kanrisha_shitsu" width="145" height="39" /></a></li>
				          <li class="kanrisha_user"><a href="<?php echo APPLICATION_URL;?>/view/manager/userManagerController	.php" class="kanrisha_user"><img src="<?php echo APPLICATION_URL;?>/images/navi/kanrisha_user.gif" alt="kanrisha_user" width="145" height="39" /></a></li>
				          <li class="kanrisha_penalty"><a href="<?php echo APPLICATION_URL;?>/view/manager/unauthorized_detect.php" class="kanrisha_penalty"><img src="<?php echo APPLICATION_URL;?>/images/navi/kanrisha_penalty.gif" alt="kanrisha_penalty" width="145" height="39" /></a></li>			
				        </ul>
				      </div>
				   <!-- /navi -->
				   
				   <!-- contents -->
				       <div id="content">
				       		  <h1><img src="<?php echo APPLICATION_URL;?>/images/h1_faq.gif" alt="よくあるご質問" /></h1>
				       		  <h1 style="color: Blue">テナントさん管理</h1>
				              <p>&nbsp;</p>
				           <div id="pnlResult" class="result">
				           <form action="<?php echo APPLICATION_URL;?>/view/manager/register.php"><button>Add User</button> </form>
				             
				              <table class="result">
			                      <tr>
			                        <th class="result_th_1">ウーザID</th>
			                        <th class="result_th_1">お名前</th>
			                        <th class="result_th_1">メールアドレス</th>
			                        <th class="result_th_1">ウーザ</th>
			                        <th colspan="200">Action</th>
			                      </tr>               
	                              <?php
	                              		foreach ($users as $user){
	                              			print "<tr>";
	                              			print "<td>".$user->getUserAccName()."</td>";
	                              			print "<td>".$user->getUserName()."</td>";
	                              			print "<td>".$user->getUserEmail()."</td>";
	                              			if($user->getUserKind()==0) echo "<td><div style = 'color:red;'>新しいユーザ</div></td>";
	                              			else if($user->getUserKind()==1) print "<td>テナントさん</td>";
	                              			else print "<td>管理者</td>";
	                              			print "<td><form action='./AdminChangeUserInfo.php' type='post'><button name='userid' value=".$user->getUserId().">情報を変更</button></form></td>";
	                              			//print "<td><form action='./viewOrderedController.php' type='post' ><button name='userid' value=".$user->getUserId().">会議室予約</button></form></td>";
	                              			print "</tr>";
	                              		} 
	                              ?>
	                              
                              </table>
                            </div>        
                                     
                              <p>&nbsp;</p>        
                              <p>&nbsp;</p>        
                              <p>&nbsp;</p>      
                              <p>&nbsp;</p>        
                              <p>&nbsp;</p>        
                              <p>&nbsp;</p>        
                              <p>&nbsp;</p>        
                              <p>&nbsp;</p>        
                              <p>&nbsp;</p>        
                              <p>&nbsp;</p>
				        </div>
				    <!-- /contents -->
				    
			</div>
	  		<!-- /main -->
	  		
		      <div id="pr"><p>&nbsp;</p></div>
			</div>
	    </div>
	     <!-- /main_middle_area -->
	<div id="main_bottom_area">&nbsp;</div>
<!-- main_area -->
      
<!-- FOOTER -->	
	<div id="footer_area">
	  <div id="footer">
	    <ul>
	      <li class="left"><a href="<?php echo APPLICATION_URL;?>/index.php">ホーム</a></li>
<!--	      <li><a href="<?php echo APPLICATION_URL;?>/view/user/login.php">ログイン</a></li>-->
	      <li><a href="<?php echo APPLICATION_URL;?>/view/user/Register.php">新規会員登録</a></li>
	      <li><a href="<?php echo APPLICATION_URL;?>o/index.php">Q&A</a></li>
	    </ul>
	    <p>Copyright&nbsp;&copy;&nbsp;Team 08</p>
	  </div>
	</div>
<!-- FOOTER -->	
</body>
</html>